package com.yaoayao.mall.activity.client;

import com.yaoayao.mall.common.result.Result;
import com.yaoayao.mall.model.activity.SeckillGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

@FeignClient(value = "service-activity")
public interface ActivityFeignClient {
    @GetMapping("/api/activity/seckill/findAll")
    public List<SeckillGoods> findAll();

    @GetMapping("/api/activity/seckill/findBySkuId/{skuId}")
    public SeckillGoods findBySkuId(@PathVariable Long skuId);

    /**
     * 秒杀确认订单
     * @return
     */
    @GetMapping("/api/activity/seckill/auth/trade")
    Result<Map<String, Object>> trade();
}
